-- Beginning room

local Layouts = Layouts
local Get = LayoutGet

local function landmark(opts)
	local o = opts or {}
	o.start_mask = PLACE_MASK.IGNORE_IMPASSABLE_BARREN_RESERVED
	o.fill_mask = PLACE_MASK.IGNORE_IMPASSABLE_BARREN_RESERVED
	o.layout_position = LAYOUT_POSITION.CENTER
	return o
end

local function Get2(src, opts)
	return Get(src, landmark(opts))
end

Layouts["RG_ChooseStartingEquips"] = Get2("map/static_layouts/rg_start", {disable_transform = true})

RG_AddRoom("RG_Blank", {
	value = GROUND.IMPASSABLE,
	contents = {},
	-- type = NODE_TYPE.Blank,
})


RG_AddRoom("RG_ChooseStartingEquips", {
	value = GROUND.IMPASSABLE,
	contents = {
		countstaticlayouts = {
			RG_ChooseStartingEquips = 1,
		}
	},
})

RG_AddTask("RG_Blank_Task", {
	locks = LOCKS.NONE,
	keys_given = KEYS.NONE,

	room_choices = {
		["RG_Blank"] = 1,
	},
	room_bg = GROUND.GRASS,
	background_room = "RG_Blank",
})

local level = RG_AddLevel{
	id = "RG_START",
	name = "Start level",
	desc = "",
	overrides = {
		{"start_setpeice", 	"RG_ChooseStartingEquips"},
		{"start_node", 		"RG_ChooseStartingEquips"},
		{"day", 			"onlyday"},
		{"world_size",		"default"},
	},

	tasks = {
		"RG_Blank_Task",
	},

	numoptionaltasks = 0,

	required_prefabs = {
		"goldnugget"
	},

	background_node_range = {0, 0},
	nomaxwell = true,
}